/* 自定义地图弹窗样式 */
.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.custom-popup .leaflet-popup-content {
  margin: 10px;
  line-height: 1.4;
}

.custom-popup .leaflet-popup-tip {
  background: white;
  border-color: white;
}

/* 自定义标记样式 */
.custom-marker {
  background: transparent;
  border: none;
}

/* 选中标记的脉冲动画 */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
  }
}

/* 增强的距离标签样式 */
.enhanced-distance-label {
  background: transparent;
  border: none;
}

.enhanced-distance-label > div {
  animation: distanceLabelFloat 3s ease-in-out infinite;
}

@keyframes distanceLabelFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* 起点和终点标签样式 */
.point-label {
  background: transparent;
  border: none;
  z-index: 1000;
}

.start-label > div {
  animation: modernPointLabelFloat 3s ease-in-out infinite;
}

.end-label > div {
  animation: modernPointLabelFloat 3s ease-in-out infinite 1.5s;
}

@keyframes modernPointLabelFloat {
  0%, 100% {
    opacity: 0.95;
    transform: translateY(-50px) translateX(-50%) scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-52px) translateX(-50%) scale(1.02);
    filter: brightness(1.1);
  }
}

/* 标签进入动画 */
.point-label > div {
  animation-fill-mode: both;
}

.start-label > div {
  animation: labelSlideIn 0.6s ease-out, modernPointLabelFloat 3s ease-in-out infinite 0.6s;
}

.end-label > div {
  animation: labelSlideIn 0.6s ease-out 0.3s, modernPointLabelFloat 3s ease-in-out infinite 2.1s;
}

@keyframes labelSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-30px) translateX(-50%) scale(0.8);
  }
  100% {
    opacity: 0.95;
    transform: translateY(-50px) translateX(-50%) scale(1);
  }
}

/* 距离标签样式 */
.distance-label {
  background: transparent;
  border: none;
}

/* 地图容器样式 */
.map-container {
  position: relative;
}

/* 毛玻璃效果增强 */
@supports (backdrop-filter: blur(10px)) {
  .distance-info-panel {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* 连接线发光效果 */
.leaflet-pane-overlayPane path[stroke="#ff6600"] {
  filter: drop-shadow(0 0 3px rgba(255, 102, 0, 0.5));
}

.leaflet-pane-overlayPane path[stroke="#ffaa66"] {
  filter: drop-shadow(0 0 8px rgba(255, 170, 102, 0.3));
}

/* 响应式设计 */
@media (max-width: 768px) {
  .custom-popup .leaflet-popup-content-wrapper {
    max-width: 250px;
  }
  
  .custom-popup .leaflet-popup-content {
    margin: 8px;
    font-size: 13px;
  }
  
  /* 移动端距离信息面板调整 */
  .distance-info-panel {
    position: fixed !important;
    top: 80px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
  }
  
  /* 移动端距离标签调整 */
  .enhanced-distance-label > div {
    font-size: 12px !important;
    padding: 6px 10px !important;
    min-width: 60px !important;
  }
  
  /* 移动端起点终点标签调整 */
  .point-label > div {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }
}

/* 连接线样式增强 */
.leaflet-interactive[stroke="#ff6600"] {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255, 102, 0, 0.4));
}

.leaflet-interactive[stroke="#ffaa66"] {
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.3;
}

/* 悬浮距离标签样式 */
.hover-distance-label {
  background: transparent;
  border: none;
  z-index: 2000;
}

.hover-distance-label > div {
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 时间流向连接线增强效果 */
.leaflet-interactive[stroke*="hsl"] {
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.3s ease;
}

/* 时间轨迹线发光效果 */
.leaflet-pane-overlayPane path[stroke*="hsl(240"] {
  filter: drop-shadow(0 0 4px rgba(100, 149, 237, 0.6));
}

.leaflet-pane-overlayPane path[stroke*="hsl(0"] {
  filter: drop-shadow(0 0 4px rgba(255, 69, 0, 0.6));
}

.leaflet-pane-overlayPane path[stroke*="hsl(280"] {
  filter: drop-shadow(0 0 6px rgba(147, 112, 219, 0.4));
}

#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

/* 自定义标记点动画 */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0,255,0,0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
  }
}

/* 自定义弹窗样式 */
.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 15px;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.3);
}

.custom-popup .leaflet-popup-tip {
  background: white;
  border: 1px solid rgba(255,255,255,0.3);
}

/* 增强的距离标签样式 */
.enhanced-distance-label {
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.05);
  }
}

/* 悬浮距离标签样式 */
.hover-distance-label {
  pointer-events: none;
}

/* 选中点标签样式 */
.selection-label {
  animation: labelPulse 1.5s ease-in-out infinite;
}

@keyframes labelPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* 时间轴样式 */
#timeline-container {
  user-select: none;
}

.timeline-slider {
  transition: all 0.2s ease;
  cursor: grab;
}

.timeline-slider:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.timeline-slider:active {
  cursor: grabbing;
  transform: scale(1.2);
}

.timeline-range {
  background: linear-gradient(90deg, #ff6600, #ff8800);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
  transition: all 0.3s ease;
}

.timeline-background {
  background: linear-gradient(90deg, #e0e0e0, #f0f0f0, #e0e0e0);
  transition: all 0.3s ease;
}

/* 时间轴容器样式 */
.timeline-container {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.timeline-container:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1);
}

/* 时间显示框样式 */
.time-display {
  background: rgba(255, 102, 0, 0.1);
  border: 1px solid rgba(255, 102, 0, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.time-display:hover {
  background: rgba(255, 102, 0, 0.15);
  border-color: rgba(255, 102, 0, 0.3);
}

/* 图例样式 */
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.legend-item:hover {
  transform: translateY(-1px);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

.legend-item:hover .legend-dot {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* 时间轴标题样式 */
.timeline-title {
  background: linear-gradient(135deg, #ff6600, #ff8800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeline-container {
    left: 10px;
    right: 10px;
    padding: 15px;
  }
  
  .time-display {
    flex-direction: column;
    gap: 10px;
  }
  
  .legend-item {
    font-size: 11px;
  }
}

/* 时间轴拖动时的视觉反馈 */
.timeline-dragging {
  cursor: grabbing !important;
}

.timeline-dragging .timeline-slider {
  transform: scale(1.3);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* 时间轴激活状态 */
.timeline-active {
  background: linear-gradient(90deg, #ff8800, #ffaa00);
  box-shadow: 0 4px 16px rgba(255, 136, 0, 0.4);
}

/* 时间轴左侧面板样式 */
.timeline-left-panel {
  width: 320px;
  height: 100vh;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  backdrop-filter: blur(15px);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding: 24px 20px;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
  overflow: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* 时间轴容器优化 */
#timeline-container {
  position: relative;
  height: 50px;
  width: 100%;
  margin: 10px 0;
}

/* 时间轴背景轨道 */
.timeline-track {
  position: absolute;
  top: 22px;
  left: 10px;
  right: 10px;
  height: 6px;
  background: linear-gradient(90deg, #e0e0e0, #f0f0f0, #e0e0e0);
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* 时间轴选中范围 */
.timeline-range-bar {
  position: absolute;
  top: 20px;
  height: 10px;
  background: linear-gradient(90deg, #ff6600, #ff8800);
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.4);
}

/* 时间轴滑块 */
.timeline-slider {
  position: absolute;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: grab;
  border: 3px solid white;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  font-weight: bold;
  user-select: none;
  transition: all 0.2s ease;
  z-index: 15;
}

.timeline-slider.start {
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.timeline-slider.end {
  background: linear-gradient(135deg, #f44336, #ef5350);
}

.timeline-slider:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.timeline-slider.dragging {
  transform: scale(1.2);
  cursor: grabbing;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

/* 时间范围显示面板 */
.time-range-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 102, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 102, 0, 0.2);
  margin-bottom: 15px;
} 